package se.webbzon.boltzmann.game.object.portal;

import se.webbzon.boltzmann.environment.AbstractEnvironment;
import se.webbzon.oschi01.friendly.Friendly;

public class RoadPortalDeflation extends AbstractPortalDeflation {

	/*============================================================
	Constructors
	============================================================*/
	
	/** Creates a new empty road portal deflation. **/
	public RoadPortalDeflation(int deflationProperties) {
		super(deflationProperties);
	}
	
	/** Creates a new road portal deflation of an existing road portal. **/
	public RoadPortalDeflation(int deflationProperties, RoadPortal portal) {
		super(deflationProperties,portal);
	}
	
	/*============================================================
	Friendly Methods
	============================================================*/
	
	/** Creates a new road portal from the road portal deflation. **/
	@Friendly RoadPortal makePortal(AbstractEnvironment env) {
		RoadPortal portal = new RoadPortal(env, getWorldAreaName(), getPortalId());
		
		portal.setPosition(getX(), getY(), getZ());
		portal.setSize(getWidth(), getHeight(), getDepth());
		portal.setRotation(getEX(), getEY(), getEZ(), getAngle());
		
		return portal;
	}

}
